package com.biz.primus.management.tms.init;

import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * Created by defei on 9/19/17.
 */
@Service
public class InitManager {

    @PostConstruct
    public void setup() {

//        List<MenuGroupVO> menuGroups = newArrayList();
//        MenuGroupVO menuGroupVO = new MenuGroupVO("MANAGEMENT_DEMO", "示例管理", "各种示例管理", "fa fa-cogs", CommonStatusEnum.ENABLE, 999);
//        List<MenuItemVO> menuItems = newArrayList();
//        MenuItemVO menuManageMenuItemVO = new MenuItemVO("MANAGEMENT_DEMO_CAT", "猫管理", "显示猫列表", "fa fa-list", "commodity/category.do", CommonStatusEnum.ENABLE, 1);
//        menuManageMenuItemVO.setGrantedAuthority(new GrantedAuthority("ROLE_CAT;OPT_CAT_LIST"));
//        List<ResourceVO> resources = newArrayList();
//        resources.add(new ResourceVO("MANAGEMENT_DEMO_CAT_EDIT", "修改", "修改猫", CommonStatusEnum.ENABLE, new GrantedAuthority("OPT_CAT_EDIT"), 1));
//        resources.add(new ResourceVO("MANAGEMENT_DEMO_CAT_DELETE", "删除", "删除猫", CommonStatusEnum.ENABLE, new GrantedAuthority("OPT_CAT_DELETE"), 2));
//        menuManageMenuItemVO.setResources(resources);
//        menuItems.add(menuManageMenuItemVO);
//        menuGroupVO.setMenuItems(menuItems);
//        menuGroups.add(menuGroupVO);
//        AuthorityHyena.registerMenu(menuGroups);
    }
}
